SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 66997: Improvements on the length of the STRING data type determination have been added to SAS/ACCESS® Interface to Google BigQuery

DetailsHotfixAboutRate It

This hot fix enables the length of a character variable in SAS to be dependent on the actual length of the value stored in the Google BigQuery database rather than always being assigned a default length. You can use the SCANSTRINGCOLUMNS= option with the following methods of connection to the Google BigQuery database:

LIBNAME GBQ BIGQUERY SCANSTRINGCOLUMNS=YES ..;

PROC SQL; CONNECT TO BIGQUERY(SCANSTRINGCOLUMNS=YES ...);

 

When you use SCANSTRINGCOLUMNS=YES, a query is sent to the database to determine the maximum length of the longest value for each of the STRING variables. That maximum length is then used to set the length of the SAS variable rather than the default length of 2,000 (8,000 if you use UTF-8). 

Currently, any STRING variables in which every row for that variable is NULL will be defined with the default length even with SCANSTRINGCOLUMNS=YES. You can change the default length for STRING variables that do not contain any values by setting the MAX_CHAR_LEN=  option to a value of your choice. However, this option also affects the ARRAY data type, so it might not be a viable workaround if your table contains both ARRAY data types and STRING data types that only contain NULLs.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to Google BigQuery (on SAS Viya)Linux for x64V.03.052020.1.1ViyaViya
SAS SystemSAS Data Connector to Google BigQueryLinux for x64V.03.052020.1.1ViyaViya
SAS SystemSAS/ACCESS Interface to Google BigQueryLinux for x649.49.439.4 TS1M69.4 TS1M8
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.